/*******************************************************************************
* This header defines the types of possible errors in each class of cvlibrary.
* 
*
* Licensed under GPL Version 3 license (/license.txt).
* Author: Eder A. Perez (eder.perez@ice.ufjf.br)
*******************************************************************************/

#ifndef __CV_ERROR_H__
#define __CV_ERROR_H__
  
typedef enum {

  /*******************************************************************************/
  /* General                                                                     */
  /*******************************************************************************/
  CV_SUCCESS = 0,
  CVERROR_UNKNOW,
  CVERROR_MEMORY_ALLOCATION,
  CVERROR_INVALID_FILE,
  CVERROR_EOF,
  CVERROR_CONVERTION,
  
  
  /*******************************************************************************/
  /* CVImage: Image errors                                                       */
  /*******************************************************************************/
  CVERROR_IMG_FILE_NOT_FOUND,
  CVERROR_IMG_FILE_NOT_CREATED,
  CVERROR_IMG_BMP_SIGNATURE,
  CVERROR_IMG_BMP_INVALID_DIB_HEADER,
  CVERROR_IMG_BMP_INVALID_BPP,
  CVERROR_IMG_UNSUPPORTED_FORMAT,


  /*******************************************************************************/
  /* CVVideo: Video file errors                                                  */
  /*******************************************************************************/
  CVERROR_FILE_NOT_FOUND,
  CVERROR_STRM_INFO_NOT_FOUND,
  CVERROR_VIDEO_STRM_NOT_FOUND,
  CVERROR_CODEC_NOT_FOUND,
  CVERROR_CODEC_NOT_OPENED,
  CVERROR_FRAME_NOT_ALLOCATED,
  CVERROR_CONVERT_FRAME_TO_RGB,
  CVERROR_NO_VIDEO_DATA,
  
  
  
  /*******************************************************************************/
  /* CVVideo: V4L2 errors                                                        */
  /*******************************************************************************/
  CVERROR_V4L2_CAMERA_NOT_OPENED,
  CVERROR_V4L2_WARNING_PRIORITY_NOT_SET,
  CVERROR_V4L2_INCOMPATIBLE_DEVICE,
  CVERROR_V4L2_NO_SIGNAL,
  CVERROR_V4L2_WARNING_SET_DATA_FORMAT_ERROR
  
  
  /*******************************************************************************/
  /* CVVideo: IEEE1394 camera errors                                             */
  /*******************************************************************************/
  // Not implemented yet.
  
  
  
} CVerror_t;

#endif
